/*
 * Wire
 * Copyright (C) 2018 Wire Swiss GmbH
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program. If not, see http://www.gnu.org/licenses/.
 *
 */

/* container */
.conversation-list-cell {
  cursor: pointer;
  display: flex;
  font-weight: @font-weight-regular;
  height: 56px;
  position: relative;

  &::after {
    background-color: #fff;
    bottom: 0;
    content: '';
    left: @left-list-item-left-width;
    height: 1px;
    opacity: 0.06;
    position: absolute;
    right: 0;
  }
}

.conversation-list-cell-left {
  .flex-center;
  flex: 0 0 auto;
  width: @left-list-item-left-width;
}

.conversation-list-cell-center {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
}

.conversation-list-cell-right {
  .flex-center;
  padding-right: 16px;
}

/* elements */
.conversation-list-cell-availability {
  .availability-state-icon {
    margin: 1px 8px 1px 0;
  }

  .availability-state-label {
    .ellipsis-nowrap;
    font-size: 14px;
    line-height: 16px;
    margin-right: 4px;
  }
}

.conversation-list-cell-name {
  .ellipsis-nowrap;
  font-size: 14px;
  line-height: 16px;
  margin-right: 4px;
  user-select: none;
}

.conversation-list-cell-description {
  .ellipsis-nowrap;
  font-size: 12px;
  font-weight: @font-weight-regular;
  line-height: 16px;
  margin-right: 4px;
  margin-top: 2px;
  opacity: 0.64;
}

.conversation-list-cell-badge {
  font-size: 12px;
}

.conversation-list-cell-context-menu {
  .flex-center;
  .square(20px);

  &::before {
    content: '';
    transition: opacity @animation-timing-slow @ease-out-quart @animation-timing-faster + 0.05;
    opacity: 0;
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 4px solid #fff;

    .conversation-list-cell:hover & {
      opacity: 1;
    }
  }
}

/* states */

.conversation-list-cell-left-opaque {
  opacity: 0.32;
}
